/**
* +----------------------------------------------------------------------
* | 友得云客  - 开启房产营销新纪元
* +----------------------------------------------------------------------
* | Copyright (c) 2019~2023 优得（西安）信息科技有限公司版权所有
* +----------------------------------------------------------------------
* | Licensed 友得云客不是自由软件 未经允许不可移除相关版权
* +----------------------------------------------------------------------
* | Author: www.youdeyunke.com
* +----------------------------------------------------------------------
*/
import request from '@/utils/request'


export function getPostBrokerList (params) {
    return request({
        url: '/admin6/post_brokers',
        method: 'get',
        params
    })
}

export function appendPostBroker (postId, brokerId) {
    return request({
        url: '/admin6/post_brokers/',
        method: 'post',
        data: { post_id: postId, broker_profile_id: brokerId },
    })
}

export function getSimpleBrokerList (params) {
    return request({
        url: '/admin/broker_profile/simplesearch',
        method: 'get',
        params
    })

}

export function getBrokerList (params) {
    return request({
        url: '/admin6/broker_profile/',
        method: 'get',
        params
    })
}

export function getBrokerGroupsData (params) {
    return request({
        url: '/admin/broker_profile/groupsdata',
        method: 'get',
        params
    })

}



export function deletePostBroker (data) {
    return request({
        url: '/admin6/post_brokers/0',
        method: 'DELETE',
        data: data,
    })
}

export function updatePostBrokersOrder (postId, brokerIds) {
    return request({
        url: '/admin/post_brokers/update_order',
        method: 'POST',
        data: { ids: brokerIds, post_id: postId, },
    })
}
